<template>
    <div>
      <div class="bg-white grid-content">
        <div style="overflow: hidden; ">
          <div class="mytitle"><svg-icon icon-class="trqsj" class="myIcon" /> 天 然 气 底 数 </div>
        </div>
        <!-- 表格 -->
        <el-table :data="tableData">
          <el-table-column type="index" label="序号" :index="indexMethod"></el-table-column>
  
          <el-table-column align="center" prop="datetime" label="日期"></el-table-column>
  
          <el-table-column align="center" label="各单位日用气量">
            <el-table-column align="center" label="第一采油作业区">
              <el-table-column align="center" label="实验站">
                <el-table-column align="center" prop="syzLljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="syzQl" label="气量"></el-table-column>
              </el-table-column>
  
              <el-table-column align="center" label="东12转油站">
                <el-table-column align="center" prop="d12zyzLljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="d12zyzQl" label="气量"></el-table-column>
              </el-table-column>
  
              <el-table-column align="center" label="尚12转油站">
                <el-table-column align="center" prop="s12zyzLljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="s12zyzQl" label="气量"></el-table-column>
              </el-table-column>
  
              <el-table-column align="center" label="矿部调压箱">
                <el-table-column align="center" prop="kbtyxLljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="kbtyxQl" label="气量"></el-table-column>
              </el-table-column>
            </el-table-column>
  
            <el-table-column align="center" label="第二采油作业区">
              <el-table-column align="center" label="东16转油站">
                <el-table-column align="center" prop="d16zyzLljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="d16zyzQl" label="气量"></el-table-column>
              </el-table-column>
  
              <el-table-column align="center" label="树382转油站">
                <el-table-column align="center" prop="s382zyzLljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="s382zyzQl" label="气量"></el-table-column>
              </el-table-column>
  
              <el-table-column align="center" label="东14转油站">
                <el-table-column align="center" prop="d14zyzLljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="d14zyzQl" label="气量"></el-table-column>
              </el-table-column>
  
              <el-table-column align="center" label="东18转油站">
                <el-table-column align="center" prop="d18zyzLljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="d18zyzQl" label="气量"></el-table-column>
              </el-table-column>
            </el-table-column>
  
            <el-table-column align="center" label="第三采油作业区">
              <el-table-column align="center" label="树2转油站">
                <el-table-column align="center" prop="s2zyzLljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="s2zyzQl" label="气量"></el-table-column>
              </el-table-column>
  
              <el-table-column align="center" label="树8转油站">
                <el-table-column align="center" prop="s8zyzLljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="s8zyzQl" label="气量"></el-table-column>
              </el-table-column>
  
              <el-table-column align="center" label="树16转油站">
                <el-table-column align="center" prop="s16zyzLljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="s16zyzQl" label="气量"></el-table-column>
              </el-table-column>
  
              <el-table-column align="center" label="树101注气站">
                <el-table-column align="center" prop="s101zqzLljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="s101z1zQl" label="气量"></el-table-column>
              </el-table-column>
            </el-table-column>
  
            <el-table-column align="center" label="第四采油作业区">
              <el-table-column align="center" label="树127转油站">
                <el-table-column align="center" prop="s127zyzLljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="s127zyzQl" label="气量"></el-table-column>
              </el-table-column>
  
              <el-table-column align="center" label="徐6转油站">
                <el-table-column align="center" prop="x6zyzLljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="x6zyzQl" label="气量"></el-table-column>
              </el-table-column>
  
              <el-table-column align="center" label="榆2联合站">
                <el-table-column align="center" prop="y2lhzLljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="y2lhzQl" label="气量"></el-table-column>
              </el-table-column>
  
              <el-table-column align="center" label="中间加热站">
                <el-table-column align="center" prop="zjjrzLljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="zjjrzQl" label="气量"></el-table-column>
              </el-table-column>
            </el-table-column>
  
            <el-table-column align="center" label="肇州">
              <el-table-column align="center" label="升22">
                <el-table-column align="center" prop="s22Lljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="s22Ql" label="气量"></el-table-column>
              </el-table-column>
  
              <el-table-column align="center" label="肇25">
                <el-table-column align="center" prop="z25Lljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="z25Ql" label="气量"></el-table-column>
              </el-table-column>
            </el-table-column>
  
            <el-table-column align="center" label="后勤分公司">
              <el-table-column align="center" label="锅炉房">
                <el-table-column align="center" prop="glfLljds" label="流量计底数"></el-table-column>
                <el-table-column align="center" prop="glfQl" label="气量"></el-table-column>
              </el-table-column>
            </el-table-column>
          </el-table-column>
  
          <el-table-column align="center" prop="remark" label="备注"></el-table-column>
  
          <el-table-column
            align="center"
            fixed="right"
            prop="approveStatus"
            label="审核状态"
            >
            <template slot-scope="scope">
                <el-tag
                :type="
                    scope.row.approveStatus == '2'
                    ? 'success'
                    : scope.row.approveStatus == '1'
                    ? 'warning'
                    : scope.row.approveStatus == '0'
                    ? 'info'
                    : 'danger'
                "
                disable-transitions
                >{{
                    scope.row.approveStatus == "2"
                    ? "已通过"
                    : scope.row.approveStatus == "1"
                    ? "未审核"
                    : scope.row.approveStatus == "0"
                    ? "未提交"
                    : "未通过"
                }}</el-tag
                >
            </template>
            </el-table-column>
  
            <el-table-column align="center" fixed="right" label="操作" width="100">
                <template slot-scope="scope">
                    <el-button @click="handleClick(scope.row, 'check')" type="text"
                    >查看</el-button
                    >
                    <el-button @click="handleClick(scope.row, 'edit')" type="text"
                    >审核</el-button
                    >
                </template>
            </el-table-column>
        </el-table>
        <!-- 分页器 -->
        <el-pagination align='right'
            background
            @size-change="handleSizeChange" 
            @current-change="handleCurrentChange" 
            :current-page="pageNo"
            :page-sizes="[5,10, 20, 30, 40, 50]" 
            :page-size="pageSize" 
            layout="total, sizes, prev, pager, next, jumper"
            :total="total">
          </el-pagination>
      </div>
  
      <!-- 弹出框 -->
      <el-dialog :title="myDialogTitle" :visible.sync="dialogFormVisible"  :before-close="handleClose" custom-class="saveAsDialog">
        <el-form v-show="ischeck" :inline="true" :model="trqForm" class="demo-form-inline"  :rules="rules" ref="trqForm" :disabled="isInput" label-position="left" label-width="190px" >
          <el-row>
            <el-col :span="12">
              <el-form-item label="日期:">
                <el-date-picker v-model="trqForm.datetime" align="right" type="date" placeholder="请选择日期"
                  :picker-options="pickerOptions">
                </el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>
  
          <el-divider content-position="left">第一采油作业区-实验站</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.syzLljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.syzQl" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-divider content-position="left">第一采油作业区-东12转油站</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.d12zyzLljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.d12zyzQl" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-divider content-position="left">第一采油作业区-尚12转油站</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.s12zyzLljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.s12zyzQl" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-divider content-position="left">第一采油作业区-矿部调压箱</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.kbtyxLljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.kbtyxQl" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
  
          <el-divider content-position="left">第二采油作业区-东16转油站</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.d16zyzLljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.d16zyzQl" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-divider content-position="left">第二采油作业区-树382转油站</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.s382zyzLljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.s382zyzQl" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-divider content-position="left">第二采油作业区-东14转油站</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.d14zyzLljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.d14zyzQl" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-divider content-position="left">第二采油作业区-东18转油站</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.d18zyzLljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.d18zyzQl" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
  
          <el-divider content-position="left">第三采油作业区-树2转油站</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.s2zyzLljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.s2zyzQl" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-divider content-position="left">第三采油作业区-树8转油站</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.s8zyzLljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.s8zyzQl" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-divider content-position="left">第三采油作业区-树16转油站</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.s16zyzLljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.s16zyzQl" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-divider content-position="left">第三采油作业区-树101注气站</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.s101zqzLljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.s101z1zQl" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
  
          <el-divider content-position="left">第四采油作业区-树127转油站</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.s127zyzLljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.s127zyzQl" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-divider content-position="left">第四采油作业区-徐6转油站</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.x6zyzLljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.x6zyzQl" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-divider content-position="left">第四采油作业区-榆二联合站</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.y2lhzLljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.y2lhzQl" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-divider content-position="left">第四采油作业区-中间加热站</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.zjjrzLljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.zjjrzQl" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          
          <el-divider content-position="left">肇州-升22</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.s22Lljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.s22Ql" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
  
          <el-divider content-position="left">肇州-肇25</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.z25Lljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.z25Ql" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
  
          <el-divider content-position="left">后勤分公司-锅炉房</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="流量计底数:">
                <el-input v-model="trqForm.glfLljds" placeholder="请输入流量计底数"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="气量:">
                <el-input v-model="trqForm.glfQl" placeholder="请输入气量"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
  
          <el-divider content-position="left">备注</el-divider>
          <el-row>
            <el-col :span="12">
              <el-form-item label="备注:">
                <el-input type="textarea" v-model="trqForm.remark" placeholder="请输入备注"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
  
        </el-form>
  
        <el-form
            v-show="!ischeck"
            :inline="true"
            :model="trqForm"
            class="demo-form-inline"
            ref="trqForm"
        >
            <el-form-item label="审核">
            <el-select
                v-model="trqForm.approveStatus"
                placeholder="请选择审核状态"
            >
                <!-- trqForm.approveStatus=='0'? trqForm.approveStatus == '未审核':trqForm.approveStatus=='1'?dymcForm.approveStatus == '通过':dymcForm.approveStatus == '不通过' -->
                <el-option label="未审核" value="1"></el-option>
                <el-option label="通过" value="2"></el-option>
                <el-option label="不通过" value="3"></el-option>
            </el-select>
            </el-form-item>

            <el-row>
            <el-form-item label="审核备注:">
                <el-input
                v-model="trqForm.approveBz"
                placeholder="请输入审核备注"
                ></el-input>
            </el-form-item>
            </el-row>
        </el-form>

        <div slot="footer" class="dialog-footer" v-show="!ischeck">
          <el-button @click="close('trqForm')">取 消</el-button>
          <el-button type="primary" @click="submitForm('trqForm')">确 定</el-button>
        </div>
      </el-dialog>
    </div>
  </template>
  
  <script>
  import trqApi from '@/api/sjtb/scgl/trqsj';
  
  export default {
    data() {
      return {
        pageNo: 1, //当前页码
        pageSize: 10, //每页显示数量
        total: 0, //总数量
        // table数据
        tableData: [{
  
        }],
        //当前页码
        currentPage: 1,
        //表单填报的数据
        trqForm: {
          approveStatus: '', //审核状态
          id: '',
          datetime: '', //填报日期
          remark: '',//备注
          syzLljds: '', //实验站流量计底数
          syzQl: '', //实验站气量
          d12zyzLljds: '', //东12转油站流量计底数
          d12zyzQl: '', //东12转油站气量
          s12zyzLljds: '', //尚12转油站流量计底数
          s12zyzQl: '', //尚12转油站气量
          kbtyxLljds: '', //矿部调压箱流量计底数
          kbtyxQl: '', //矿部调压箱气量
          d16zyzLljds: '', //东16转油站流量计底数
          d16zyzQl: '', //东16转油站气量
          s382zyzLljds: '', //树382转油站流量计底数
          s382zyzQl: '', //树382转油站气量
          d14zyzLljds: '', //东14转油站流量计底数
          d14zyzQl: '', //东14转油站气量
          d18zyzLljds: '', //东18转油站流量计底数
          d18zyzQl: '', //东18转油站气量
          s2zyzLljds: '', //树2转油站流量计底数
          s2zyzQl: '', //树2转油站气量
          s8zyzLljds: '', //树8转油站流量计底数
          s8zyzQl: '', //树8转油站气量
          s16zyzLljds: '', //树16转油站流量计底数
          s16zyzQl: '', //树16转油站气量
          s101zqzLljds: '', //树101注气站流量计底数
          s101z1zQl: '', //树101注气站气量
          s127zyzLljds: '', //树127转油站流量计底数
          s127zyzQl: '', //树127转油站气量
          x6zyzLljds: '', //徐6转油站流量计底数
          x6zyzQl: '', //徐6转油站气量
          y2lhzLljds: '', //榆二联合站流量计底数
          y2lhzQl: '', //榆二联合站气量
          zjjrzLljds: '', //中间加热站流量计底数
          zjjrzQl: '', //中间加热站气量
          s22Lljds: '', //升22流量计底数
          s22Ql: '', //升22气量
          z25Lljds: '', //肇25流量计底数
          z25Ql: '', //肇25气量
          glfLljds: '', //锅炉房流量计底数
          glfQl: '', //锅炉房气量
        },
        rules: {
          id: [
            { required: true, message: '请输入id号', trigger: 'bulr' }
          ]
        },
        //时间快捷选择
        pickerOptions: {
          disabledDate(time) {
            return time.getTime() > Date.now();
          },
          shortcuts: [{
            text: '今天',
            onClick(picker) {
              picker.$emit('pick', new Date());
            }
          }, {
            text: '昨天',
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24);
              picker.$emit('pick', date);
            }
          }, {
            text: '一周前',
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit('pick', date);
            }
          }]
        },
        //获取当前日期
        currentTime:'',
        //编辑框是否显示
        dialogFormVisible: false,
        //弹出框是否是查看
        ischeck: false,
        // 弹出框是否有提交审核按钮
        ischeckSh: false,
        //控制查看时不可更改数据
        isInput:false,
        //弹出框标题
        myDialogTitle: '',
      }
    },
    created(){
      this.search();
    },
    mounted(){
      this.filterTime();
    },
    methods: {
      /**
      * 查询列表
      */
      async search() {
        // this.pageNo = pageNo; //当前页码
        // this.pageSize = pageSize; //每页显示数量
        //发送查询请求
        let res = await trqApi.gettrqList(this.pageNo,this.pageSize, 0);
        //判断是否成功
        if(res.success){
          console.log(res.data);
          //赋值
          this.tableData = res.data.records;
          
          //总数量
          this.total = res.data.total;
        }
      },
      onSubmit() {
        console.log('submit!');
      },
      //关闭对话框
      handleClose(done) {      
        // 清空表单
        // this.$refs['trqForm'].resetFields();
        // 清空表单校验，避免再次进来会出现上次校验的记录
        this.$refs['trqForm'].clearValidate()
        done()
        
      },
      // 弹框关闭触发
      close(formName) {
        this.dialogFormVisible = false;
        // 清空表单
        // this.$refs[formName].resetFields();
        // 清空表单校验，避免再次进来会出现上次校验的记录
        this.$refs[formName].clearValidate()
      },
      submitForm(formName) {
        //表单验证
        this.$refs[formName].validate(async (valid) => {
            if (valid) {
                let res = null;
                console.log(this.trqForm.id+"111")
                //判断菜单ID是否为空
                if (this.trqForm.id === '') {
                  this.trqForm.datetime = this.currentTime;
                  //发送添加请求
                  res = await trqApi.addtrq(this.trqForm);
                } else {
                    // console.log(334345)
                    res = await trqApi.updatetrq(this.trqForm);
                }
                console.log(res)
                //判断是否成功
                if (res.success) {
                    // this.$message.success(res.message);
                    this.$message({ message: "修改审核状态成功！", type: "success" });
                    //刷新
                    this.search();
                    //关闭窗口
                    this.dialogFormVisible = false;
                } else {
                  console.log(res)
                    this.$message.error(res.message);
                }
            }
        })
      },
      handleClick(row, handle) {
        this.dialogFormVisible = true;
        if (handle == 'check') {
          this.myDialogTitle = '天然气数据材料'
          this.saveAsDialog = "saveAsDialog1";
          if (row.approveStatus == 0) {
            this.ischeckSh = true;
          }
          else {
            this.ischeckSh = false;
          }
          this.ischeck = true;
          this.isInput = true;
          // this.trqForm = row
          this.$objCopy(row, this.trqForm);//把当前要编辑的数据复制到数据域，给表单回显
          this.$message({ message: '成功打开', type: 'success' });
        } else if (handle == 'edit') {
          if(row.approveStatus!=2){
              this.myDialogTitle = '天然气数据材料审核'
              this.saveAsDialog = "saveAsDialog2";
              this.ischeck = false  
              this.ischeckSh = false  
              this.isInput = false     
              this.$objCopy(row, this.trqForm);//把当前要编辑的数据复制到数据域，给表单回显
            }else {
              this.dialogFormVisible = false;
              this.$message({ message: '已通过不可再审核！', type: 'error' });
            }
        }
      },
      handleSizeChange(size) {
        console.log(size);
        this.pageSize = size;
        //将每页显示的数量交给成员变量
        this.search(this.pageNo, size);
      },
      /*** 当页码发生变化时触发该事件 */
      handleCurrentChange(page) {
        console.log(page);
        this.pageNo = page;
        //调用查询方法
        this.search(page, this.pageSize);
      },
      // 序号计算
      indexMethod (index) {
      // index默认在0开始，这里+1
        return index + 1 + (this.pageNo - 1) * this.pageSize
      },
      // 获取当前日期
      filterTime() {
        var date = new Date();
        var y = date.getFullYear();
        var m = date.getMonth() + 1;
        m = m < 10 ? '0' + m : m;
        var d = date.getDate();
        d = d < 10 ? '0' + d : d;
        this.currentTime = y + '-' + m + '-' + d;
      }
    }
  }
  </script>
  
  <style lang="scss" scoped>
// 标题
.mytitle {
  font-size: large;
  padding-left: 10px;
  margin-bottom: 16px;
  float: left;
}

//按钮组
.myButtons {
  float: right;
}

//格子的样式
.bg-white {
  background: #ffffff;
}

.grid-content {
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
}

.calendar ::v-deep .el-button-group::before {
  display: none;
}

.calendar ::v-deep .el-button-group::after {
  display: none;
}

// 分割线样式
.el-divider--horizontal {
  display: block;
  height: 2px;
  width: 100%;
  margin: 24px 0;
}

// 表单各项的样式
.el-form-item {
  margin: 15px 10px 15px 10px;
}

//表单禁用字体样式
.el-input.is-disabled ::v-deep .el-input__inner {
  color: #606266;
}
//对话框宽度
// .customWidth{
//         width:80%;
//     }
::v-deep .saveAsDialog1 {
  width: 60% !important;
}
::v-deep .saveAsDialog2 {
  width: 20% !important;
}
//日期选择框宽度
.el-date-editor.el-input,
.el-date-editor.el-input__inner {
  width: 200px;
}

.el-input {
  width: 200px;
}
</style>